﻿@{
    Layout = null;
}
@using Models;

<div class="bjui-pageHeader"></div>
<div class="bjui-pageContent">
    <form action="UserEdit" id="users_edit" data-toggle="validate" data-alertmsg="false" autocomplete="off">
        <table class="table table-condensed table-hover" width="100%">
            <tbody>
                @if (Model != null)
                {
                    <tr>
                        <td>
                            <label class="control-label x100">编号：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="Id" id="Id" value="@Model.Id" size="15" readonly>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">账号类型：</label>
                        </td>
                        <td>
                            <input type="hidden" id="Role_id" name="Role_id" value="@Model.Role_id" />
                            <input type="text" name="Role_name" id="Role_name" value="@Model.Role_name" data-rule="账号类型:required" readonly placeholder="[必选] 账号类型" data-toggle="findgrid"
                                   data-options="{
                        group: '',
                        include: 'Role_id,Role_name',
                        dialogOptions: {title:'选择账号类型'},
                        gridOptions: {
                            local: 'local',
                            dataUrl: 'Users/Search',
                            columns: [
                                {name:'Role_id', label:'ID', width:100},
                                {name:'Role_name', label:'账号类型'}
                            ]
                        }
                    }">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">登录账号：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="Login_name" id="Login_name" readonly data-rule="登录账号:required" maxlength="15" value="@Model.Login_name" size="15" placeholder="[必填] 登录账号">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">姓名：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="User_name" id="User_name" data-rule="用户姓名:required" maxlength="15" value="@Model.User_name" size="15" placeholder="[必填] 用户姓名">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">密码：</label>
                        </td>
                        <td>
                            <input type="password" runat="server" name="User_pwd" id="User_pwd" data-rule="密码:required" maxlength="15" value="@Model.User_pwd" size="15" placeholder="[必填] 密码">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">邮箱：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="User_email" id="User_email" data-rule="email" value="@Model.User_email" size="15" placeholder="邮箱，找回密码">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">状态：</label>
                        </td>
                        <td>
                            @if (Model.Disable == 1)
                            {
                                <input runat="server" type="checkbox" id="Disable" name="Disable" value="1" checked data-toggle="icheck" data-label="正常">
                            }
                            else
                            {
                                <input runat="server" type="checkbox" id="Disable" name="Disable" value="1" data-toggle="icheck" data-label="正常">
                            }
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">备注：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="Disabledesc" id="Disabledesc" maxlength="15" value="@Model.Disabledesc" size="20" placeholder="备注">
                        </td>
                    </tr>
                }
                else
                {

                    <tr>
                        <td>
                            <label class="control-label x100">登录账号：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="Login_name" id="Login_name" data-rule="登录账号:required" maxlength="15" value="" size="15" placeholder="[必填] 登录账号">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">账号类型：</label>
                        </td>
                        <td>
                            <input type="hidden" id="Role_id" name="Role_id" value="" />
                            <input type="text" name="Role_name" id="Role_name" value="" data-rule="账号类型:required" readonly placeholder="[必选] 账号类型" data-toggle="findgrid"
                                   data-options="{
                        group: '',
                        include: 'Role_id,Role_name',
                        dialogOptions: {title:'选择类型'},
                        gridOptions: {
                            local: 'local',
                            dataUrl: 'Users/Search',
                            columns: [
                                {name:'Role_id', label:'ID', width:100},
                                {name:'Role_name', label:'账号类型'}
                            ]
                        }
                    }">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">姓名：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="User_name" id="User_name" data-rule="用户姓名:required" maxlength="15" value="" size="15" placeholder="[必填] 用户姓名">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">密码：</label>
                        </td>
                        <td>
                            <input type="password" runat="server" name="User_pwd" id="User_pwd" data-rule="密码:required" maxlength="15" value="" size="15" placeholder="[必填] 密码">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">邮箱：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="User_email" id="User_email" data-rule="email" value="" size="15" placeholder="邮箱，找回密码">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">状态：</label>
                        </td>
                        <td>
                            <input runat="server" type="checkbox" id="Disable" name="Disable" value="1" checked data-toggle="icheck" data-label="正常">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label class="control-label x100">备注：</label>
                        </td>
                        <td>
                            <input type="text" runat="server" name="Disabledesc" id="Disabledesc" maxlength="15" value="" size="20" placeholder="备注">
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">取消</button></li>
        <li><button type="submit" class="btn-green" data-icon="save">提交</button></li>
    </ul>
</div>